{{- $params := .Site.Params }}
{{- $centerLogo := $params.centerLogo }}
{{ $logo := $params.logo }}
<header class="nav_header" >
  <nav class="nav">
    <a href='{{ absLangURL "" }}' class="nav_brand nav_item{{ if eq $centerLogo true }} nav_hide{{ end }}">
      {{- with $logo }}
      <img src="{{ absURL . }}" class="logo">
      {{- else }}
        {{ .Site.Title }}
      {{- end }}
      <div class="nav_close">
        <div>
          {{ partial "sprite" (dict "icon" "open-menu") }}
          {{ partial "sprite" (dict "icon" "closeme") }}
        </div>
      </div>
    </a>
    <div class='nav_body nav_body_{{ .Site.Params.mobileNavigation }}'>
      {{ $context := . }}
      {{ $menuData := .Site.Data.menu }}
      {{ with $menuData }}
        {{ partial "nav" (dict "context" $context "menu" $menuData) }}
      {{- else }}
        {{ partial "nav" (dict "context" . "menu" .Site.Menus.main) }}
      {{- end }}
      {{ if .Site.IsMultiLingual }}
      <div class="nav_parent">
        <a href="#" class="nav_item">{{ .Site.Params.languageMenuName }}</a>
        <div class="nav_sub">
          <span class="nav_child"></span>
          {{ range .Site.Home.AllTranslations }}
          <a href="{{ .Permalink }}" class="nav_child nav_item">{{ .Language.LanguageName }}</a>
          {{ end }}
        </div>
      </div>
      {{ end }}

      {{- if eq $centerLogo true }}
      <a href='{{ absLangURL "" }}' class="nav_brand nav_center nav_item">
        <img src="{{ absURL $logo }}" class="logo">
      </a>
      {{- end }}
      {{- partial "follow" . }}
    </div>
  </nav>
</header>
